import request from '@/utils/request';

export function getType(query) {
  return request({
    url: '/sysm/commonDict/types',
    method: 'get',
    params: query
  });
}

export function getListByTypeCode(query) {
  return request({
    url: '/sysm/commonDict/listByTypeCode',
    method: 'get',
    params: query
  });
}

export function getListByTypeCodePage(query) {
  return request({
    url: '/sysm/commonDict/listByTypeCodePage',
    method: 'get',
    params: query
  });
}

export function getList(query) {
  return request({
    url: '/sysm/commonDict/',
    method: 'get',
    params: query
  });
}

export function saveOrUpdate(param) {
  return request.post('/sysm/commonDict/', JSON.stringify(param));
}

export function deleteById(id) {
  return request({
    url: `/sysm/commonDict/${id}`,
    method: 'delete'
  });
}

